package com.leet.meituan;

import java.io.*;
import java.lang.reflect.Array;
import java.util.Arrays;
import java.util.Scanner;

public class CopyArray {
    public static void main(String[] args) throws IOException {
        BufferedReader sc = new BufferedReader(new InputStreamReader(System.in));
        BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(System.out));
        int n = Integer.parseInt(sc.readLine());
        int[] a = new int[n];
        int[] b = new int[n];
        Arrays.fill(b,-1);
        Arrays.fill(a,-1);
        String[] nums = sc.readLine().split(" ");
        for(int i = 0;i < n; i++){
            a[i] = Integer.parseInt(nums[i]);
        }
        int count = Integer.parseInt(sc.readLine());
        for(int i = 0; i < count; i++){
            String[] ops = sc.readLine().split(" ");
            if(ops[0].equals("2")){
                System.out.println(b[Integer.parseInt(ops[1])-1]);
            }else{
                System.arraycopy(a,Integer.parseInt(ops[2])-1,b,Integer.parseInt(ops[3])-1,Integer.parseInt(ops[1]));
            }
        }
    }
}
